<html>

<head>
    <title>循环与select</title>
</head>
<body>
    <select name="" id="">
        <option value="">请选择月份</option>
        <?php for($m = 1; $m <= 12; $m++):?>
        <option value=""><?php echo sprintf("%02d", $m);?></option>
        <?php endfor;?>
    </select>
</body>
</html>